package cn.gx.kevin.common.thread;

import cn.gx.kevin.common.user.LoginUser;

/**
 * jwt登录用户 线程持有器
 * ***/
public class JWTUserThreadHolder {
	private static InheritableThreadLocal<LoginUser> holder = new InheritableThreadLocal<LoginUser>();

	public static LoginUser getUser() {
		return holder.get();
	}
	public static void setUser(LoginUser user) {
		holder.set(user);
	}
	public static void clear() {
		holder.remove();
	}
}
